﻿#include "CMyChild.h"

IMPLEMENT_DYNCREATE(CMyChild, CMDIChildWnd)
BEGIN_MESSAGE_MAP(CMyChild, CMDIChildWnd)
    ON_WM_CREATE()
END_MESSAGE_MAP()

void CMyChild::ActivateFrame(int nCmdShow)
{
	CMDIChildWnd::ActivateFrame(SW_MAXIMIZE);// 最大化显示
}

BOOL CMyChild::PreCreateWindow(CREATESTRUCT& cs)
{
    if (!CMDIChildWnd::PreCreateWindow(cs)) {
        return FALSE;
    }
    cs.style &= ~(WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SYSMENU); // 移除最大化和最小化按钮
    return TRUE;
}

int CMyChild::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
    if (!CMDIChildWnd::OnCreate(lpCreateStruct)) {
        return FALSE;
    }
    return TRUE;
}
